import {memberlist} from "../../../request/api"
interface StateMember {
    memberList:Array<object>
 }
const state = {
    memberList: []
}

const getters = {
    getMember(state:StateMember){
        return state
    }

}
const mutations = {
    REQ_GETMEMBER(state:StateMember,payload:any){
       state.memberList = payload
    }

}
const actions = {
    getMemberListActions(context:any){
        memberlist().then(res=>{
            console.log(res);
            if(res.code==200){
               context.commit("REQ_GETMEMBER",res.list)
            }
        })
    }

}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}